# 从首页进入我的订单

from selenium.webdriver.common.by import By
import time


class PageEcshopEnterMyOrder():
    def __init__(self, driver):
        self.driver = driver

    # 定义定位器
    loc_front_usercenter_welcome_page = (By.XPATH, '/html/body/div[2]/div[2]/ul/li[2]/a')

    # 打开首页
    def front_open_my_page(self):
        self.driver.get('http://192.168.1.241/hdshop/index.php')
        time.sleep(1)
        self.driver.find_element(*self.loc_front_usercenter_welcome_page).click()
